package com.gxa.exchangerate.controller;

import com.gxa.common.R;
import com.gxa.common.entity.financial_management.ExchangeRateManagement;
import com.gxa.exchangerate.service.ExchangeRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/exchangerate")
public class ExchangeRateController {

    @Autowired
    private ExchangeRateService exchangeRateService;

    //分页查询
    @GetMapping("/selectExchangeRateList")
    public R selectExchangeRateList(Integer currentPage, Integer pageSize){
        return exchangeRateService.selectExchangeRateList(currentPage,pageSize);
    }

    //条件查询
    @GetMapping("/selectExchangeRate")
    public R selectExchangeRate(Integer currentPage, Integer pageSize, ExchangeRateManagement exchangeRateManagement){
        return exchangeRateService.selectExchangeRate(currentPage,pageSize,exchangeRateManagement);
    }

    //修改浮动红线
    @PostMapping("/updateExchangeRateRedLine")
    public R updateExchangeRateRedLine(@RequestBody ExchangeRateManagement exchangeRateManagement){
        return exchangeRateService.updateExchangeRateRedLine(exchangeRateManagement);
    }





    //查询银行汇率
    public void selectExchangeRateRecord(){
        exchangeRateService.selectExchangeRateRecord();
    }



}
